package com.ruoyi.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.Arrange;
import com.ruoyi.system.mapper.ArrangeMapper;
import com.ruoyi.system.service.IArrangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * arrangeService业务层处理
 *
 * @author ruoyi
 * @date 2022-06-07
 */
@Service
public class ArrangeServiceImpl implements IArrangeService
{
    @Autowired
    private ArrangeMapper arrangeMapper;

    /**
     * 查询arrange
     *
     * @param id arrange主键
     * @return arrange
     */
    @Override
    public Arrange selectArrangeById(Long id)
    {
        return arrangeMapper.selectArrangeById(id);
    }

    /**
     * 查询arrange列表
     *
     * @param arrange arrange
     * @return arrange
     */
    @Override
    public List<Arrange> selectArrangeList(Arrange arrange)
    {
        return arrangeMapper.selectArrangeList(arrange);
    }

    /**
     * 新增arrange
     *
     * @param arrange arrange
     * @return 结果
     */
    @Override
    public int insertArrange(Arrange arrange)
    {
        arrange.setCreateTime(DateUtils.getNowDate());
        return arrangeMapper.insertArrange(arrange);
    }

    /**
     * 修改arrange
     *
     * @param arrange arrange
     * @return 结果
     */
    @Override
    public int updateArrange(Arrange arrange)
    {
        arrange.setUpdateTime(DateUtils.getNowDate());
        return arrangeMapper.updateArrange(arrange);
    }

    /**
     * 批量删除arrange
     *
     * @param ids 需要删除的arrange主键
     * @return 结果
     */
    @Override
    public int deleteArrangeByIds(Long[] ids)
    {
        return arrangeMapper.deleteArrangeByIds(ids);
    }

    /**
     * 删除arrange信息
     *
     * @param id arrange主键
     * @return 结果
     */
    @Override
    public int deleteArrangeById(Long id)
    {
        return arrangeMapper.deleteArrangeById(id);
    }
}
